package com.kaibes.platform.currency.db;

import java.math.BigInteger;

import com.kaibes.core.base.annotation.Description;

import lombok.Data;

/**
CREATE TABLE `currency_user` (
  `id` BIGINT NOT NULL AUTO_INCREMENT,
  `user_id` Integer DEFAULT NULL,
  `currency_id` TINYINT UNSIGNED NOT NULL,
  `amount` Integer NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE,
  FOREIGN KEY (`currency_id`) REFERENCES `currency` (`id`) ON DELETE CASCADE
) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
 */
@Data
@Description("货币持有")
public class CurrencyUser {
    @Description("持有ID")
    private BigInteger id;
    @Description("用户ID")
    private Integer userId;
    @Description("货币ID")
    private Short currencyId;
    @Description("货币数量")
    private Integer amount;
}
